<template>
	<view class="song-list-comp">
		<view class="tit-bar">
			{{title}}
			<view class="more fr">歌单广场</view>
		</view>
		<view class="clearfix">
			<navigator class="item" v-for="(item, index) in list" :key="index" hover-class="none" :url="'/pages/subpages/index/album?item='+ encodeURIComponent(JSON.stringify(item))">
				<image class="img" :src="item.picUrl + $imgSuffix"></image>
				<view class="desc">{{item.name}}</view>
				<view class="count">{{item.playCount}}</view>
			</navigator>
		</view>
	</view>
</template>

<script>
	export default {
		// 从父组件传值的 共有的有主标题，链接更多，歌单数据
		props:{
			title: {
				type: String,
				default: ''
			},
			link:{
				type:String,
				default:''
			},
			list:{
				type: Array,
				default () {
					return []
				}
			}
		},
		data() {
			return {}
		},
		methods:{
			// 跳转链接
			// goUrl (item) {
			// 	uni.navigateTo({
			// 		url: '/pages/subpages/index/album?id=' + item.id,
			// 	});
			// }
		},
		
	}
</script>
<style lang="scss">
	.song-list-comp {
		padding-left: 32rpx;
		margin-top:10rpx;
		.tit-bar {
			font-size: 34rpx;
			font-weight: 600;
			line-height: 110rpx;
		}

		.more {
			width:150rpx;
			height:50rpx;
			line-height:50rpx;
			text-align: center;
			margin-top: 30rpx;
			margin-right: 32rpx;
			font-weight: 400;
			font-size: 24rpx;
			border: 2rpx solid #e6e6e6;
			border-radius: 50rpx;
		}

		.item {
			float:left;
			position: relative;
			width: 216rpx;
			padding-bottom:16rpx;
			margin-right: 16rpx;
			line-height: 34rpx;
			&.video{
				width: 450rpx;
			}
			.img {
				display: block;
				width: 100%;
				height: 216rpx;
				margin-bottom: 16rpx;
				background: #eee;
				border-radius: 10rpx;
			}
			.desc{
				height:62rpx;
				margin-top:12rpx;
				line-height: 30rpx;
				font-weight: 400;
				overflow: hidden;
			}
			.count{
				position:absolute;
				top:0;
				right:0;
				padding-left:25rpx;
				line-height: 34rpx;
				color:#fff;
				font-size: 24rpx;
				z-index: 10;
				background: url() no-repeat;
				background-size: 25rpx 25rpx;
				transform: scale(0.8);
			}
		}
	}
</style>